package org.example.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;

import java.util.ArrayList;
import java.util.List;

public class BookExcelReadListener implements ReadListener<BookExcel> {

    List<BookExcel> list;

    public BookExcelReadListener() {
        list = new ArrayList<BookExcel>();
    }

    @Override
    public void invoke(BookExcel bookExcel, AnalysisContext analysisContext) {
        list.add(bookExcel);
    }

    public List<BookExcel> getList() {
        return list;
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
